﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace kredit
{
    class Program
    {
        
        static void Main()
        {
            Console.CursorVisible = false;
            Random rnd = new Random();
            int d = rnd.Next(0, 50);
            int b = rnd.Next(0, 30);
            int k = 0;
            int c = 0;
            Robot Point = new Robot(d,b, ConsoleColor.DarkBlue);
            Robot r1 = new Robot(k=rnd.Next(0,30),c=rnd.Next(0,30),ConsoleColor.Green);
            Robot r2 = new Robot(k=rnd.Next(0,30),c=rnd.Next(0,30),ConsoleColor.Magenta);
            Point.Print();
            
            
            

            for (int i = 0; i < 1000; i++)
            {
                
                Thread.Sleep(500);


               
              
                int a = rnd.Next(1, 5);
               
                if (a == 1)
                {
                    r1.MoveLeft(1); r2.MoveRight(1);
                }
                else if (a == 4)
                {
                    r1.MoveRight(1); r2.MoveLeft(1);
                }
                else if (a == 2)
                {
                    r1.MoveTop(1); r2.MoveBottom(1);
                }
                else if (a == 3)
                {
                    r1.MoveBottom(1); r2.MoveTop(1);
                }

                r1.Print();
                r2.Print();
        
            }

            Console.ReadKey();

           
        }
    }
}

          
